package com.lcu.wl.modules.mnt.controller;

import com.lcu.wl.common.utils.SYSDATA;
import com.lcu.wl.modules.mnt.service.IServerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 系统服务监控
 */
@RestController
@RequestMapping("/mnt/server")
public class ServerController {

    @Autowired
    private IServerService iServerService;

    @GetMapping("/list")
    @ApiOperation("查询服务监控")
    public SYSDATA list(){
        Map<String,Object> list = iServerService.getServers();
        return SYSDATA.ok().put("list",list);
    }
}
